package com.ftg.learn.springcore;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

/**
 * @author kangjx
 * @createTime 2022/11/29
 */
public class Learncore01 {

    public static void main(String[] args) {
//        FileSystemXmlApplicationContext  采用file路径来解决  c: d: E:
//        ClassPathXmlApplicationContext  源文件源地址  src  | target/classes
        BeanFactory bf = new ClassPathXmlApplicationContext("application.xml");

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("application.xml");
        Boolean ist = applicationContext.containsBean("cat");
        System.out.println(ist);

        ClassPathXmlApplicationContext t =  new ClassPathXmlApplicationContext("application.xml");
        /**
         *  我们用是的 ClassPathXmlApplicationContext
         *         -- this(new String[] {configLocation}, true, null);
         *         -- super(parent);
         *         父类 -- AbstractXmlApplicationContext
         *            父类 -- AbstractRefreshableConfigApplicationContext   实现了两个接口 implements BeanNameAware, InitializingBean
         *               父类 -- AbstractRefreshableApplicationContext
         *                 父类 -- AbstractApplicationContext     实现了接口ConfigurableApplicationContext  实现了  ApplicationContext, Lifecycle, Closeable
         *
         *
         * ApplicationContext 有一个父接口 ListableBeanFactory  有一个父接口 BeanFactory
         */



    }

}
